package com.b1.controller;

import com.b1.common.BaseResponse;
import com.b1.common.ResultUtils;
import com.b1.pojo.enity.Kindgarden;
import com.b1.service.KindgardenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("b1/kindgarden")
@CrossOrigin
@Api(tags = "幼儿园管理")
@Slf4j
public class KindgardenController {
    @Resource
    KindgardenService kindgardenService;
    @GetMapping("/list")
    @ApiOperation(value = "查询所有幼儿园")
    public BaseResponse<List<Kindgarden>> addChildernSleepRecord(){

        List<Kindgarden> list = kindgardenService.list();
        return  ResultUtils.success(list);
    }

}
